A Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages (Technical Report)

نویسندگان

  • Meng Wang
  • Kung Chen
  • Siau-Cheng Khoo
  • Shu-Chun Weng
  • Chung-Hsin Chen
چکیده

Introducing aspect orientation to a polymorphically typed functional language strengthens the importance of type-scoped advices; i.e., advices with their effects being harnessed by type constraints. As types are typically treated as compile time entities, it is desirable to be able to perform static weaving to determine at compile time the chaining of type-scoped advices to the invocations of their associated join points. In this paper, we describe a compilation model, as well as its implementation, that enables static type inference and static weaving of programs in an aspect-oriented polymorphically typed functional language, AspectFun . We describe a typedirected weaving scheme that successfully, and coherently, weaves type-scoped advices into base programs, in the presence of nested and second-order advices. We also demonstrate how control-flow based pointcuts (such as cflow and cflowbelow) are compiled away, and describe several type-directed optimization strategies that can improve the efficiency of woven code.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages

Introducing aspect orientation to a polymorphically typed functional language strengthens the importance of type-scoped advices; i.e., advices with their effects harnessed by type constraints. As types are typically treated as compile time entities, it is highly desirable to be able to perform static weaving to determine at compile time the chaining of type-scoped advices to their associated jo...

متن کامل

Type-directed weaving of aspects for polymorphically typed functional languages

Incorporating aspect-oriented paradigm to a polymorphically typed functional language enables the declaration of type-scoped advice, in which the effect of an aspect can be harnessed by introducing possibly polymorphic type constraints to the aspect. The amalgamation of aspect orientation and functional programming enables quick behavioral adaption of functions, clear separation of concerns and...

متن کامل

A Typed Intermediate Language for Flow-Directed Compilation

We present a typed intermediate language λ for optimizing compilers for function-oriented and polymorphically typed programming languages (e.g., ML). The language λ is a typed lambda calculus with product, sum, intersection, and union types as well as function types annotated with flow labels. A novel formulation of intersection and union types supports encoding flow information in the typed pr...

متن کامل

Preserving Separation of Concerns Through Compilation

Current aspect-oriented (AO) compilation techniques fail to preserve the separation of concerns for postcompilation phases. At the minimum, it makes efficient incremental compilation and unit testing of AO programs challenging. The contribution of this work is an improved approach for aspect-oriented compilation. Our approach rests on a new interface between the AO high-level language (HLL) com...

متن کامل

On the Expressive Power of Simply Typed and Let-Polymorphic Lambda Calculi

We present a functional framework for descriptive computational complexity, in which the Regular, First-and Elementary sets have syntactic characterizations. In this framework, typed lambda terms represent inputs and outputs as well as programs. The lambda calculi describing the above computational complexity classes are simply or let-polymorphically typed with function-alities of xed order. Th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007